# ZY SmartBI Installation and Quick Start Guide

## Product Introduction

ZY SmartBI is an advanced conversational Business Intelligence (BI) platform that allows you to interact with enterprise data using natural language. Without writing complex SQL queries, you can simply ask questions, and ZY SmartBI will generate accurate SQL, visualize data, and provide intelligent analysis for you. It supports advanced features such as multi-turn conversations, data drilling, anomaly detection, and root cause analysis, helping you gain deep insights from data.

This product is currently in preview version with a 6-month availability period. For more authorization and custom development, please contact us.

For more information, please refer to [User Quick Start Guide](docs/user/01_quick_start.md) and [Core Features User Manual](docs/user/02_core_features_guide.md).

## Installation Steps

Please follow these steps to install and configure ZY SmartBI:

### 1. Prepare the Installation Package

1. Download the 2 required installation software packages (python and postgresql) and this compressed package from the online disk.

all download：https://drive.google.com/drive/folders/1MOtZ-NhEozVuN9MWv_lrjECpXn8WsLyZ?usp=sharing

Or download manually:
PostgreSQL (latest version 17.6): https://www.enterprisedb.com/downloads/postgres-postgresql-downloads

Python 3.13.6: https://www.python.org/downloads/

Note: Win7 system is not currently supported, please upgrade to Win10 or Win11 or above.

2. Place the downloaded 3 software packages in this directory, or install them manually.

### 2. Install Core Components

1. Double-click to run the `Install chatBI.bat` script to install the core components of ZY SmartBI.

### 3. Database Configuration (PostgreSQL by default)

ZY SmartBI uses PostgreSQL database by default. Please ensure that PostgreSQL has been installed and configured, then modify the database connection information in the `.env` file according to actual conditions:

```env
# Database Configuration
DB_USER=postgres
DB_PASSWORD=ZYCBI2025
DB_HOST=127.0.0.1
DB_PORT=5432
DB_NAME=chatbi_forge_dev
```

### 4. Configure Environment Variables

Edit the `.env` file to configure the following key information:

```env
# Administrator Account (created on first startup)
DEFAULT_ADMIN_USERNAME=admin
DEFAULT_ADMIN_PASSWORD=admin1

# Enable any password login, cancel for False
LOGIN_DEBUG=True

# LLM API Keys (configure at least one)
DEEPSEEK_API_KEY=your_deepseek_api_key_here
#or kimi2 
DEEPSEEK_API_BASE_URL="https://api.moonshot.cn/v1"
DEEPSEEK_TEXT_MODEL="kimi-k2-0711-preview"

DASHSCOPE_API_KEY=your_dashscope_api_key_here
DASHSCOPE_API_BASE_URL=https://dashscope.aliyuncs.com/api/v1

# Project Information File Path (optional)
PROJECT_INFO_FILE_PATH=ZYchatBI_project_info.txt
```

### 5. Start Service

Double-click to run the `Run ZY chatBI.bat` script to start the ZY SmartBI service.

It takes about 40 seconds for the service to start. After successful startup, you can access the system through the following URLs:

*   **User Login:** http://127.0.0.1:8000/login
*   **Chat Interface:** http://127.0.0.1:8000/chat
*   **Admin Dashboard:** http://127.0.0.1:8000/admin/dashboard

## Quick Experience

1. Open your browser and visit http://127.0.0.1:8000/login
2. Log in with the default administrator account:
   *   Username: `admin`
   *   Password: `admin1`
3. Ask your first question in the chat interface, for example: "Show the total sales for each month last year."
4. View the SQL query generated by the system, data tables, and visualization charts.

## Related Resources

*   **Prompt Examples:** `prompt_example.txt`
*   **User Manual:** Series of documents in the `docs/user/` directory
*   **Admin Manual:** Series of documents in the `docs/admin/` directory

## Technical Support

If you have any questions, please contact your system administrator or technical support team.

Shenzhen ZhanYing Technology
WeChat: youkpan
zyinfo.pro